<?php include_once 'brand_header_admin.php' ;?>
<!--主体内容-->
<?php 
		$tb_standard = "盒";
		$tb_package = "条";
		$tb_title = $tb_hbarcode = $tb_tbarcode = $tb_intro = "";
		$tb_w_price = $tb_r_price = 10;

					
		$action =  "index.php?mod=brandadmin&code=brand_edit&action=edit";
		if( isset($this->Get['id']) && !empty($this->Get['id']) ){
			$tb_title = $tbInfo['tobacco_name'];
			$tb_w_price = $tbInfo['w_price'];
			$tb_r_price = $tbInfo['r_price'];
			$tb_standard = $tbInfo['standard'];
			$tb_package = $tbInfo['package'];
			$tb_hbarcode = $tbInfo['hBarcode'];
			$tb_tbarcode = $tbInfo['tBarcode'];
			$tb_intro = $tbInfo['intro'];
			$action =  $action."&id=".$this->Get['id'];
		}
?>
<div class="main admin">
	<!--左侧导航菜单-->
	<?php include_once 'brand_admin_left.php' ;?>
	<!--主体内容-->
	<div class="r_box">
		<div class="title">
		  <h1>添加新品牌</h1></div>
		<div class="rlist">
		<form method="post" action="<?php echo $action; ?>"  enctype="multipart/form-data">
			<table width="620px" border="0" cellpadding="0" cellspacing="0" class="post" >
				<tr>
					<td width="100px">品牌名称：</td>
					<td colspan="3"><input type="text" name="tb_title" value="<?php echo $tb_title ;?>" class="inptxt" style="width:470px"></td>
				</tr>
				<tr>
					<td>类别：</td>
					<td width="210px"><select name="tb_producttype" class="inptxt" style="width:160px">
						<option value="烤烟型">烤烟型</option>
						</select></td>
					<td width="100px" >品类：</td>
					<td><select name="tb_pinlei" class="inptxt" style="width:160px">
						<option value="高级">高级</option>
						<option value="二级">二级</option>
						<option value="三级">三级</option></select></td>
				</tr>
				<tr>
					<td>批发价：</td>
					<td><input name="tb_w_price" type="text" name="" value="<?php echo $tb_w_price ;?>" class="inptxt" style="width:60px"> 元</td>
					<td >零售指导价：</td>
					<td><input name="tb_r_price" type="text" name="" value="<?php echo $tb_r_price ;?>" class="inptxt" style="width:60px"> 元</td>
				</tr>
				<tr>
					<td>所属系列：</td>
					<td colspan="3"><select name="tb_seriesID" class="inptxt" style="width:160px">
					<?php foreach( $comBrandList as $cbl ){
						echo '<option value="'.$cbl['id'].'">'.$cbl['brandseri'].'</option>';					
					}?>
					</select></td>
				</tr>
				<tr>
					<td>品牌规格：</td>
					<td ><input type="text" name="tb_standard" value="<?php echo $tb_standard ;?>" class="inptxt" style="width:160px"></td>
					<td>包装规格：</td>
					<td ><input type="text" name="tb_package" value="<?php echo $tb_package ;?>" class="inptxt" style="width:160px"></td>
				</tr>
				<tr>
					<td>盒包条形码：</td>
					<td ><input type="text" name="tb_hbarcode" value="<?php echo $tb_hbarcode ;?>" class="inptxt" style="width:160px"></td>
					<td >条包条形码：</td>
					<td><input type="text" name="tb_tbarcode" value="<?php echo $tb_tbarcode ;?>" class="inptxt" style="width:160px"></td>
				</tr>
                <tr>
					<td>产品图片：</td>
					<td colspan="3"><p><input type="text" name="tb_pic" id="tb_pic"  class="inptxt" style="width:360px"/>
					<input type="button" class="button" onclick="window.open('mul_upload/pic_upload.php', '图片批量上传', 'left=56,top=42,directories=no,width=430,height=300,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no', true);" value="上传图片"></p>
					  <p>最少上传一张产品图片</p></td>
				</tr>
				<tr>
					<td>详细内容：</td>
					<td colspan="3"><textarea name="tb_intro" class="inptxt" style="height:300px;width:500px" ><?php echo $tb_intro ;?></textarea></td>
				</tr>
				<tr>
					<td colspan="4" align="center"><button type="submit" class="button">保存</button> <button type="reset" class="reset">取消</button></td>
				</tr>
			</table>
		</form>
		
		</div>
	</div>
	<div class="float_both"></div>
</div>
<!--底部-->
<?php include_once 'brand_footer.php' ;?>
